#include <bits/stdc++.h>
using namespace std;
#define PI 3.1415926
#define   SQUARE(x) ((x)*(x))
//double SQUARE(double x) { return x*x;}

int main()
{
	int x, y, z;
	double x2, b;
	char c;
	scanf("%d",  &x);

	printf("%s", ((x % 4 == 0 && x % 100 != 0) || x % 400 == 0) ? "Y" : "N");

  return 0;
}
